/**
 * 运行时检测
 *
 */
const mongoose = require('mongoose');
const schemaDefinition = require('./schema/runtime-check');
const schemaInstance = mongoose.Schema(schemaDefinition);
schemaInstance.index({
  versionId: 1,
  fileId: 1,
  rule: 1,
  line: 1,
  column: 1,
}, { unique: true });
const modelInstance = mongoose.model('runtime-check', schemaInstance);

/**
 * Export model definition object.
 */
module.exports = modelInstance;
